package com.zzyl.nursing.service.member;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zzyl.common.core.page.TableDataInfo;
import com.zzyl.nursing.domain.Reservation;
import com.zzyl.nursing.dto.ReservationDto;
import com.zzyl.nursing.vo.ReservationCountVo;

import java.util.List;

/**
 * 预约信息业务接口
 * @author zbr
 * @version 1.0
 * @since 2025/3/5 21:18
 */
public interface IMemberReservationService extends IService<Reservation> {

    /**
     * 查询每个时间段剩余预约次数
     * @param time
     * @return
     */
    List<ReservationCountVo> getCountByTime(Long time);

    /**
     * 查询取消预约数量
     *
     * @param userId
     * @return
     */
    Integer getCancelledReservationCount(Long userId);

    /**
     * 新增预约
     * @param dto
     */
    void saveReservation(ReservationDto dto);

    /**
     * 分页查询预约信息
     *
     * @param pageNum
     * @param pageSize
     * @param status
     * @return
     */
    TableDataInfo<Reservation> getPage(Integer pageNum, Integer pageSize, Integer status);

    /**
     * 取消预约
     * @param id
     */
    void cancel(Long id);

    /**
     *
     */
    void updateReservationStatus();
}
